package com.jml.config;


import com.jml.callback.CloseCallbackImpl;
import com.jml.callback.StartCallbackImpl;
import com.jml.service.RegisterService;
import com.jml.service.ServiceRenewal;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConditionalOnClass(JmlCloudConfig.class)
public class JmlCloudAutoConfiguration {

    @Bean
    public JmlCloudConfig jmlCloudConfig() {
        return new JmlCloudConfig();
    }

    @Bean
    public RegisterService registerService() {
        return new RegisterService();
    }

    @Bean
    public ServerConfig serverConfig() {
        return new ServerConfig();
    }

    @Bean
    public StartCallbackImpl startCallbackImpl() {
        return new StartCallbackImpl();
    }

    @Bean
    public CloseCallbackImpl closeCallbackImpl() {
        return new CloseCallbackImpl();
    }

    @Bean
    public ServiceRenewal serviceRenewal() {
        return new ServiceRenewal();
    }
}
